﻿<!-- #include file="ding.asp" -->
<!-- #include file="mymin.asp" -->
<%Call Head%>
<card title="网站设计预览"><p>
<%
IF KEY<>0 then
	Call Error("你的权限不足！")
end if

Dim rs,id,body_,classname,num,lx,classid,pid,prePid,midPid
id =getN("id",0)
prePid=0

w systemMsg

If id=0 Then
	w "首页预览"
Else
	w "<a href=""preview.asp?sid="&sid&""">[首页预览]</a>"
End If

w "<br/>-----------<br/>"

set rs=server.createobject("adodb.recordset")
rs.open "select classid,lx,pid,class,br,num from 74hu_class where parent="&id&" order by pid asc,classid desc",myconn,3,1

If Not rs.eof Then
	w "顶部栏目区 (Logo,公告,登录/注册等)<a href=""config/wap.asp?sid="&sid&""">配置</a><br/><br/>"
	Do While Not rs.eOF
		classname=nowml(rs("class"))
		num=rs("num")
		lx=rs("lx")
		classid=rs("classid")
		Select Case lx
			Case 2 body_ = body_ & "UBB:"&classname
			Case 9 body_ = body_ & "WML:"&classname
			Case 8 body_ = body_ & "调用:随机广告"
			Case 10 body_ = body_ & "调用:热新文章"&num&"篇"
			Case 11 body_ = body_ & "调用:热门文章"&num&"篇"
			Case 12 body_ = body_ & "调用:随机文章"&num&"篇"
			Case 13 body_ = body_ & "调用:最新帖子"&num&"篇"
			Case 14 body_ = body_ & "调用:最热帖子"&num&"篇"
			Case 15 body_ = body_ & "调用:随机帖子"&num&"篇"
			Case 16 body_ = body_ & "调用:推荐文章"&num&"篇"
			Case 17 body_ = body_ & "调用:推荐帖子"&num&"篇"
			Case 0 body_ = body_ & "页面:<a href=""preview.asp?sid="&sid&"&amp;id="&classid&""">"&classname&"</a>"
			Case 1 body_ = body_ & "列表:"&classname
			Case 3 body_ = body_ & "论坛:"&classname
			Case 19 body_ = body_ & "调用:站内搜框"
			Case 20 body_ = body_ & "调用:群聊"
		End Select
		prePid = rs("pid")
		rs.MoveNext
		If Not rs.eof Then
			pid=rs("pid")
			midPid = Fix((pid+prePid)/2)
			If midPid=pid Or midPid=prePid Then
				midPid=pid+1
			End If
			body_ = body_ & "[<a href=""classadd.asp?sid="&sid&"&amp;pid="&midPid&"&amp;id="&id&""">插</a>."&_
				"<a href=""editclass.asp?sid="&sid&"&amp;lx="&lx&"&amp;id="&classid&""">修</a>]<br/>"
		Else
			body_ = body_ & "[<a href=""classadd.asp?sid="&sid&"&amp;pid="&prePid+500&"&amp;id="&id&""">插</a>."&_
				"<a href=""editclass.asp?sid="&sid&"&amp;lx="&lx&"&amp;id="&classid&""">修</a>]<br/>"
			Exit Do
		End If
	Loop
	w body_
	w "<br/>底部栏目区 (底部栏目)<a href=""config/wap.asp?sid="&sid&""">配置</a>"
Else
	w "暂时没有栏目！"
end if

rs.close
set rs=nothing

w "<br/>-----------<br/>温馨提示:<br/>插:在后面插入新的栏目<br/>修:修改当前的栏目<br/>-----------<br/><a href=""class.asp?sid="&sid&""">[设计中心]</a>"

Call rootLast%>